﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Little_Tower_Defense.Utilitys
{
    /// <summary>
    /// A class to search for the path to any logical content in the content-project.
    /// </summary>
    static class ContentFinder
    {
        static Dictionary<Content, string> dictionary;

        static ContentFinder()
        {
            dictionary = new Dictionary<Content, string>();

            dictionary.Add(Content.Dummy, @"Level\black");
            dictionary.Add(Content.DummyCreep, @"Creeps\SimpleCreep");
            dictionary.Add(Content.LaneField, @"Level\grey");
            dictionary.Add(Content.LawnField, @"Level\green");
            dictionary.Add(Content.UIBackground, @"UIElement\Background");
            dictionary.Add(Content.UIFont, @"UIElements\Calibri_12_Bold");
            dictionary.Add(Content.WaterField, @"Level\blue");
            dictionary.Add(Content.DummyLevel, @"Content\Level\TestLevel1.txt");
            dictionary.Add(Content.DummyTower, @"Buildings\SimpleTower");
        }

        static public string get(Content content)
        {
            try
            {
                return dictionary[content];
            }
            catch (Exception)
            {
                throw new Exception("Someone added logical content (" + content.ToString() + ") without adding a path to it.");
            }
        }
    }

    /// <summary>
    /// A list defining alle logical content in the game.
    /// </summary>
    enum Content
    {
        Dummy,
        WaterField,
        LaneField,
        LawnField,
        DummyCreep,
        UIBackground,
        UIFont,
        DummyLevel,
        DummyTower,
    }
}
